-
Notifications
You must be signed in to change notification settings - Fork 2.6k
create a new profile when being redirected from requesty #7416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've reviewed the changes and found several issues that need attention.
|
|
||
| await this.upsertProviderProfile(currentApiConfigName, newConfiguration) | ||
| // Create a new profile with a unique name to trigger settings refresh | ||
| const newProfileName = currentApiConfigName === "default" ? "requesty-oauth" : currentApiConfigName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Issue: This could cause a profile name collision. What happens if a profile named "requesty-oauth" already exists? Consider checking for existing profiles or generating a unique name:
| const newProfileName = currentApiConfigName === "default" ? "requesty-oauth" : currentApiConfigName | |
| // Create a new profile with a unique name to trigger settings refresh | |
| let newProfileName = currentApiConfigName === "default" ? "requesty-oauth" : currentApiConfigName | |
| // Ensure the profile name is unique | |
| if (this.hasProviderProfileEntry(newProfileName)) { | |
| newProfileName = `requesty-oauth-${Date.now()}` | |
| } | |
| await this.upsertProviderProfile(newProfileName, newConfiguration) |
| } | ||
|
|
||
| await this.upsertProviderProfile(currentApiConfigName, newConfiguration) | ||
| // Create a new profile with a unique name to trigger settings refresh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistency with other OAuth providers: I notice that OpenRouter (line 1383) and Glama (line 1413) OAuth callbacks update the existing profile, while Requesty creates a new one. Is this intentional? This inconsistency could confuse users who expect similar behavior across providers. Could you explain why Requesty needs different behavior?
| await this.upsertProviderProfile(currentApiConfigName, newConfiguration) | ||
| // Create a new profile with a unique name to trigger settings refresh | ||
| const newProfileName = currentApiConfigName === "default" ? "requesty-oauth" : currentApiConfigName | ||
| await this.upsertProviderProfile(newProfileName, newConfiguration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing error handling: Unlike the OpenRouter and Glama callbacks which have try-catch blocks for API calls, this method doesn't validate the code parameter or handle potential errors. Consider adding validation at the start of the method.
|
Thank you @Thibault00! I am having some issues testing this, here's what I'm seeing in the requesty page:
Not directly related to the PR but I'm unable to test it. Also @hannesrudolph can we provide Requesty our updated logo so that their dialog uses that? |
|
Stale |

App Version
Latest
API Provider
Requesty
Model Used
N/A
Roo Code Task Links (Optional)
When you click on Requesty API key from the settings and get redirected to the Requesty url, you will now create a new profile in order to be able to use the newly created api key.
🔁 Steps to Reproduce
Use Requesty as a provider when starting Roo-Code
Click "Get Requesty API Key" and you'll see get redirected to Requesty. After the redirect from Requesty to Roo Code a new profile would have been created with the new api key.
Important
In
ClineProvider.ts,handleRequestyCallback()now creates a new profile with a unique name when redirected from Requesty to ensure settings refresh.ClineProvider.ts,handleRequestyCallback()now creates a new profile with a unique name when redirected from Requesty, ensuring settings refresh.requesty-oauthas the profile name if the current profile isdefault.This description was created by
for 742b010. You can customize this summary. It will automatically update as commits are pushed.